<template>
  <div class="qrcode" :id="id"></div>
</template>

<script>
export default {
  name: 'qrcode',

  props: {
    id: {
      type: String,
      default: 'qrCode'
    },

    url: {
      type: String,
      required: true
    }
  },

  mounted () {
    // this.makeQRCode()
  },

  methods: {
    makeQRCode () {
      new QRCode(document.getElementById(this.id), url)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
